<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <title>{tempTitle}</title>
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/digital-clock.css">
    <link rel="stylesheet" href="css/autoscroll.css">
    <link rel="stylesheet" href="css/swiper.min.css">
    <script src="js/jquery-1.11.0.js"></script>
    <script src="js/echarts.min.js"></script>
    <script src="js/autoscroll.js"></script>
    <script src="js/digital-clock.js"></script>
    <script src="js/swiper.min.js"></script>
    <script src="js/effect.js"></script>
    <script src="js/bulidCharts.min.js"></script>
    <style>
        {tempStyle}
    </style>
</head>

<body style="background-color:{tempContentColor};{tempContentImage};">
    <div class="bg">
        <div class="spinner">
            <div class="rect1"></div>
            <div class="rect2"></div>
            <div class="rect3"></div>
            <div class="rect4"></div>
            <div class="rect5"></div>
        </div>
    </div>

    <div class="content" id="content" style="width:{tempContentWidth}px;height:{tempContentHeight}px;">
        {tempContent}
    </div>
    <script>
        {tempScript}


        function resizeContent(w, h) {
            let content = document.getElementById("content");

            let pw = document.documentElement.clientWidth;
            let ph = document.documentElement.clientHeight;
            let cw = w || content.offsetWidth;
            let ch = h || content.offsetHeight;
            let wp = pw / cw;
            let hp = ph / ch;

            let zoom = 1;

            if (wp < hp) {
                zoom = wp;
                content.style.setProperty('margin-left', -((cw - cw * zoom) / 2) + "px");
                content.style.setProperty('margin-top', ((ph - ch * zoom) / 2) - ((ch - ch * zoom) / 2) + "px");
            } else {
                zoom = hp;
                content.style.setProperty('margin-top', -((ch - ch * zoom) / 2) + "px");
                content.style.setProperty('margin-left', ((pw - cw * zoom) / 2) - ((cw - cw * zoom) / 2) + "px");
            }
            content.style.setProperty('top', "0px");
            content.style.setProperty('left', "0px");
            content.style.setProperty('transform', "scale(" + zoom + ")");
        }
        window.onresize = function () {
            resizeContent();
        };
        window.onload = function () {
            setTimeout(function () {
                $(".bg").fadeOut();
            }, 1000);
        };
        resizeContent();
    </script>
</body>

</html>